﻿using GrainManage.Entities.Weather;
using GrainManage.Proxy.Util;
using System.Reflection;

namespace GrainManage.Proxy
{
    public class WeatherProxy : GrainManage.Interface.IWeather
    {

        //************************************************POST************************************************

        public OutputGetYahooWeather GetYahooWeather(InputGetYahooWeather input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetYahooWeather>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputGetChinaRootWeather GetChinaRootWeather(InputGetChinaRootWeather input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetChinaRootWeather>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputGetChinaCityWeather GetChinaCityWeather(InputGetChinaCityWeather input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetChinaCityWeather>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputGetChinaCurrentWeather GetChinaCurrentWeather(InputGetChinaCurrentWeather input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetChinaCurrentWeather>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputGetChinaNext7DayWeather GetChinaNext7DayWeather(InputGetChinaNext7DayWeather input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetChinaNext7DayWeather>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputGetImageUrl GetImageUrl(InputGetImageUrl input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetImageUrl>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputGetImageFile GetImageFile(InputGetImageFile input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetImageFile>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

    }
}
